Thread: My most amazing error yet! [complicated]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #19
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    >> Are you even allowed to just take the address of the first element of a vector, and assume that everything is contiguous from that point?

    Yes, the code you quoted is correct. The vector version has the advantage of automatic memory management as well, which is why it is preferred over your solution.
    Last edited by Daved; 10-31-2006 at 02:36 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. PGO is amazing
    By cyberfish in forum Tech Board
    Replies: 8
    Last Post: 02-13-2009, 12:30 AM
  2. When done right, PC games are amazing
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 08-13-2008, 05:32 PM
  3. Amazing Pool Tricks
    By hk_mp5kpdw in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 05-07-2005, 07:50 PM
  4. Hiking in the Rockies..Amazing!
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 01-11-2005, 10:36 AM
  5. It's amazing...
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 01-18-2002, 02:44 AM